package com.diandi.ddsb.bean;

import com.alibaba.fastjson.annotation.JSONField;
import com.diandi.activity.bean.LotteryTicket;

import java.util.Date;

/**
 * 优惠券使用明细表
 *
 */
public class TicketUseDetail extends BaseEntity {

	/**
	 * serialVersionUID:TODO（用一句话描述这个变量表示什么）
	 * 
	 * @author Administrator
	 * @since 2015年12月8日
	 */

	private static final long serialVersionUID = -8287781322507088535L;
	// 用户ID
	private Long userId;
	// 优惠券ID
	private Long ticketId;
	// 券码
	private String ticketCode;
	// 领取时间
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	private Date receiveTime;
	// 激活时间
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	private Date activatingTime;
	// 到期时间
	@JSONField(format = "yyyy-MM-dd")
	private Date expireTime;
	// 使用时间
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	private Date useTime;
	// 状态(0未使用1已激活2已使用3失效)
	/**
	 * @link TicketUseStatus
	 */
	private Integer status;
	private Integer userType;;

	public Integer getUserType() {
		return userType;
	}

	public void setUserType(Integer userType) {
		this.userType = userType;
	}

	// 类型
	/**
	 * @see LotteryTicketType
	 */
	private Integer type;
	// 投资最小金额(0不限制)
	private Double investMiniAmount;
	// 标的类型
	private Integer borrowType;
	// 优惠券金额
	private Double amount;
	// 加息点
	private Double addInterest;
	// 奖励时点
	private Integer rewardPoint;
	// 直抵优惠券投资比例
	private String investRatio;
	// 加息率
	private Double addInterestRate;
	// 加息天数
	private Integer addInterestDays;
	// 最大投资金额
	private Double maxInvestAmount;
	// 适用于标的类型(0-散标,1-活期宝,2-优选计划,3-新手标)
	private String borrowTypes;
	// (适用平台 1-PC,2-app,3-触屏端)
	private String publishPlatforms;
	// 投资人id
	private Long investorId;
	// 投资记录Id
	private Long borrowInvestId;

	private LotteryTicket ticket;

	/*private User user;

	private Borrow borrow;*/

	/**
	 * 交易流水号
	 */
	private String tradeNo;

	private Long staffId;

	/**
	 * 加息类型:1自定义加息时长，2按投资产品期限
	 */
	private Integer addInterestType;

	/**
	 * 标的借款期限(月)
	 */
	private String borrowLoanPeriods;
	/**
	 * 减免比例
	 */
	private Double freeProportion; 
	/**使用还款类型
	 */
	public String repaymentTypes;

	/**
	 * 用户等级（0：普通用户，1：V+用户，2：试用V+用户）
	 * 默认为 0
	 */
	private Integer userClassType;

	public TicketUseDetail(Long userId, Long ticketId, String ticketCode, Date receiveTime, Date activatingTime,
                           Date expireTime, Date useTime, Integer status, Integer type, Double investMiniAmount, Integer borrowType,
                           Double amount, Double addInterest, Integer rewardPoint, Double addInterestRate, Integer addInterestDays,
                           Double maxInvestAmount, String borrowTypes, String publishPlatforms) {
		this.userId = userId;
		this.ticketId = ticketId;
		this.ticketCode = ticketCode;
		this.receiveTime = receiveTime;
		this.activatingTime = activatingTime;
		this.expireTime = expireTime;
		this.useTime = useTime;
		this.status = status;
		this.type = type;
		this.investMiniAmount = investMiniAmount;
		this.borrowType = borrowType;
		this.amount = amount;
		this.addInterest = addInterest;
		this.rewardPoint = rewardPoint;
		this.addInterestRate = addInterestRate;
		this.addInterestDays = addInterestDays;
		this.maxInvestAmount = maxInvestAmount;
		this.borrowTypes = borrowTypes;
		this.publishPlatforms = publishPlatforms;
	}

	public TicketUseDetail() {

	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getTicketId() {
		return ticketId;
	}

	public void setTicketId(Long ticketId) {
		this.ticketId = ticketId;
	}

	public String getTicketCode() {
		return ticketCode;
	}

	public void setTicketCode(String ticketCode) {
		this.ticketCode = ticketCode;
	}

	public Date getReceiveTime() {
		return receiveTime;
	}

	public void setReceiveTime(Date receiveTime) {
		this.receiveTime = receiveTime;
	}

	public Date getActivatingTime() {
		return activatingTime;
	}

	public void setActivatingTime(Date activatingTime) {
		this.activatingTime = activatingTime;
	}

	public Date getExpireTime() {
		return expireTime;
	}

	public void setExpireTime(Date expireTime) {
		this.expireTime = expireTime;
	}

	public Date getUseTime() {
		return useTime;
	}

	public void setUseTime(Date useTime) {
		this.useTime = useTime;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Double getInvestMiniAmount() {
		return investMiniAmount;
	}

	public void setInvestMiniAmount(Double investMiniAmount) {
		this.investMiniAmount = investMiniAmount;
	}

	public Integer getBorrowType() {
		return borrowType;
	}

	public void setBorrowType(Integer borrowType) {
		this.borrowType = borrowType;
	}

	public Double getAmount() {
		return amount;
	}

	public void setAmount(Double amount) {
		this.amount = amount;
	}

	public Double getAddInterest() {
		return addInterest;
	}

	public void setAddInterest(Double addInterest) {
		this.addInterest = addInterest;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getRewardPoint() {
		return rewardPoint;
	}

	public void setRewardPoint(Integer rewardPoint) {
		this.rewardPoint = rewardPoint;
	}

	public String getInvestRatio() {
		return investRatio;
	}

	public void setInvestRatio(String investRatio) {
		this.investRatio = investRatio;
	}

	public Double getAddInterestRate() {
		return addInterestRate;
	}

	public void setAddInterestRate(Double addInterestRate) {
		this.addInterestRate = addInterestRate;
	}

	public Integer getAddInterestDays() {
		return addInterestDays;
	}

	public void setAddInterestDays(Integer addInterestDays) {
		this.addInterestDays = addInterestDays;
	}

	public Double getMaxInvestAmount() {
		return maxInvestAmount;
	}

	public void setMaxInvestAmount(Double maxInvestAmount) {
		this.maxInvestAmount = maxInvestAmount;
	}

	public String getBorrowTypes() {
		return borrowTypes;
	}

	public void setBorrowTypes(String borrowTypes) {
		this.borrowTypes = borrowTypes;
	}

	public String getPublishPlatforms() {
		return publishPlatforms;
	}

	public void setPublishPlatforms(String publishPlatforms) {
		this.publishPlatforms = publishPlatforms;
	}

	public Long getInvestorId() {
		return investorId;
	}

	public void setInvestorId(Long investorId) {
		this.investorId = investorId;
	}

	public Long getBorrowInvestId() {
		return borrowInvestId;
	}

	public void setBorrowInvestId(Long borrowInvestId) {
		this.borrowInvestId = borrowInvestId;
	}

	public String getTradeNo() {
		return tradeNo;
	}

	public void setTradeNo(String tradeNo) {
		this.tradeNo = tradeNo;
	}

	public Long getStaffId() {
		return staffId;
	}

	public void setStaffId(Long staffId) {
		this.staffId = staffId;
	}

	public LotteryTicket getTicket() {
		return ticket;
	}

	public void setTicket(LotteryTicket ticket) {
		this.ticket = ticket;
	}
/*
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Borrow getBorrow() {
		return borrow;
	}

	public void setBorrow(Borrow borrow) {
		this.borrow = borrow;
	}*/

	public Integer getAddInterestType() {
		return addInterestType;
	}

	public void setAddInterestType(Integer addInterestType) {
		this.addInterestType = addInterestType;
	}

	public String getBorrowLoanPeriods() {
		return borrowLoanPeriods;
	}

	public void setBorrowLoanPeriods(String borrowLoanPeriods) {
		this.borrowLoanPeriods = borrowLoanPeriods;
	}

	public Double getFreeProportion() {
		return freeProportion;
	}

	public void setFreeProportion(Double freeProportion) {
		this.freeProportion = freeProportion;
	}

	public String getRepaymentTypes() {
		return repaymentTypes;
	}

	public void setRepaymentTypes(String repaymentTypes) {
		this.repaymentTypes = repaymentTypes;
	}

	public Integer getUserClassType() {
		return userClassType;
	}

	public void setUserClassType(Integer userClassType) {
		this.userClassType = userClassType;
	}
}
